//
//  BoyeTimeoutView.m
//  itboye2015002
//
//  Created by hebidu on 15/10/19.
//  Copyright © 2015年 Boye. All rights reserved.
//

#import "BoyeTimeoutView.h"

@implementation BoyeTimeoutView

#pragma mark - UIView

- (id)initWithCoder:(NSCoder *)aDecoder {
    if ((self = [super initWithCoder:aDecoder])) {
        [self initialize];
    }
    return self;
}


- (id)initWithFrame:(CGRect)frame {
    if ((self = [super initWithFrame:frame])) {
        [self initialize];
    }
    return self;
}

#pragma mark - Private

- (void)initialize {
    // View defaults
    self.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    self.backgroundColor = [UIColor whiteColor];
    self.opaque = YES;
    self.contentMode = UIViewContentModeRedraw;
    
    UIImageView * imageView = [[UIImageView alloc]initWithImage:[UIImage imageWithColor:[UIColor redColor]]];
    imageView.frame = CGRectMake(SCREEN_WIDTH/4,0, SCREEN_WIDTH/2, SCREEN_WIDTH/2);
    self->_textLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, SCREEN_WIDTH/2+10, SCREEN_WIDTH, 40)];
    self->_textLabel.text = @"请求失败,点击重试!";
    self->_textLabel.textAlignment = NSTextAlignmentCenter;
    self->_textLabel.font = FONT(14);
    self->_textLabel.textColor = [UIColor lightGrayColor];
    [self addSubview:imageView];
    [self addSubview:self->_textLabel];
}


@end
